package cn.iocoder.ny.module.mall.domain.vo;


import cn.iocoder.ny.module.mall.domain.MallSpecificationExport;
import com.alibaba.excel.annotation.ExcelProperty;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonRawValue;
import com.fasterxml.jackson.databind.annotation.JsonDeserialize;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;
import java.util.List;

/**
 * @author luchunhong
 * @date 2024/08/06/ 14:39
 * @description:
 */

@Data
@TableName(value = "mall_product")
public class MallProductVo {

    private Long id;
    private Integer categoryId;
    @JsonRawValue
//    @Excel(name = "图片",cellType  = Excel.ColumnType.IMAGE,needMerge = true)
    private Object images;
//    @ExcelProperty("商品标题",needMerge = true)
    private String title;
//    @ExcelProperty("商品描述",needMerge = true)
    private String description;
    private Integer sort;
    private Integer isShow;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
    private Date createTime;
//    @ExcelProperty("分类名称",needMerge = true)
    private String name;
    private Integer parentId;
    private Long tenantId;
    private Integer logisticsMethod;
    @JsonRawValue
    private Object formJson;

//    @ExcelProperty("商品规格",type = Excel.Type.EXPORT)
    private List<MallSpecificationVo> specifications;


//    @Excels({
//            @Excel(name = "规格名称", targetAttr = "specName" ,type = Excel.Type.IMPORT),
//            @Excel(name = "规格", targetAttr = "volume",type = Excel.Type.IMPORT),
//            @Excel(name = "商品库存", targetAttr = "stock",type = Excel.Type.IMPORT),
//            @Excel(name = "划线价", targetAttr = "priceLining",type = Excel.Type.IMPORT),
//            @Excel(name = "价格", targetAttr = "specValue",type = Excel.Type.IMPORT)
//    })
//    private MallSpecificationExport specificationExport = new MallSpecificationExport();


//    public MallSpecificationExport getSpecificationExport() {
//        return specificationExport;
//    }
//
//    public void setSpecificationExport(MallSpecificationExport specificationExport) {
//        this.specificationExport = specificationExport;
//    }

    public Integer getLogisticsMethod() {
        return logisticsMethod;
    }

    public void setLogisticsMethod(Integer logisticsMethod) {
        this.logisticsMethod = logisticsMethod;
    }

    public Object getFormJson() {
        return formJson;
    }

    public void setFormJson(Object formJson) {
        this.formJson = formJson;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Integer getCategoryId() {
        return categoryId;
    }

    public void setCategoryId(Integer categoryId) {
        this.categoryId = categoryId;
    }


    public void setImages(String images) {
        this.images = images;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }

    public String getDescription() {
        return description;
    }

    public Object getImages() {
        return images;
    }

    public void setImages(Object images) {
        this.images = images;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public Integer getSort() {
        return sort;
    }

    public void setSort(Integer sort) {
        this.sort = sort;
    }

    public Integer getIsShow() {
        return isShow;
    }

    public void setIsShow(Integer isShow) {
        this.isShow = isShow;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getParentId() {
        return parentId;
    }

    public void setParentId(Integer parentId) {
        this.parentId = parentId;
    }

    public Long getTenantId() {
        return tenantId;
    }

    public void setTenantId(Long tenantId) {
        this.tenantId = tenantId;
    }

    public List<MallSpecificationVo> getSpecifications() {
        return specifications;
    }

    public void setSpecifications(List<MallSpecificationVo> specifications) {
        this.specifications = specifications;
    }
}
